package com.jueling.culture.mapper;


import com.jueling.culture.core.Mapper;
import com.jueling.culture.model.UserAuthority;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author linp
 * @date 2022/02/18
 */
public interface UserAuthorityMapper extends Mapper<UserAuthority> {

    /**
     * 添加用户权限
     * @param userId
     * @param userAuthority
     * @return
     */
    void addUserAuthority(@Param("userId") String userId,@Param("userAuthority") List<UserAuthority> userAuthority);

    /**
     * 移除权限
     * @param id
     */
    void deleteUserAuthority(@Param("userId") String id);

    /**
     * 根据ID查询用户的权限
     * @param userId
     * @return
     */
    List<UserAuthority> getUserAuthorityList(@Param("userId") String userId);

}